﻿@model IEnumerable<MvcApplication4.Models.Post>

@{
    Layout = null;
}

@foreach (var item in Model) {
<div id = "Post_Box">
    <div id="Post_Info">
        <div id = "Post_Info_text">@Html.DisplayFor(model => item.UserLink.UserName)</div>
        <div id = "Post_Info_Image"><img src="../../Content/Images/Profile/@item.UserLink.Avatar1.Url" /></div>
    </div>
    
    <div id="Post_Text">
        <div id="Post_TimeStamp">
            <div style="float:left;">@Html.DisplayFor(model => item.Time)</div>
            @if (User.Identity.Name == item.UserLink.UserName)
            {
                <div style="float:right;">@Html.ActionLink("Delete", "DeletePost", new { id = item.PostId }) | @Html.ActionLink("Edit", "EditPost", new { id = item.PostId })</div>
            }
        </div>
        
        <div id="Post_Text_text">@Html.DisplayFor(model => item.Text)</div>
        <div id="Post_Signature">Super Signature</div>
    </div>
</div>
}